<?php $post = $this->get('posts');?>
				
<div class="x-list-title">
		<table width="100%" border="0" height="100%">
		<tr>
			<td align="left">
				<h2>
					Sửa tài sản : <?php _e($post['title'])?>
				</h2>
			</td>
			<td align="right">	
				<div class="x-list-options">

				</div>
			</td>
		</tr>
		</table>	
</div>
<form method="post" action="<?php _e(actionUrl($this))?>" onsubmit="return ajax_form(this)" enctype="multipart/form-data">
<input type="hidden" name="asset_id" value="<?php _e($this->get('asset_id'))?>"/>
	
	<div class="form-message"></div>
		<table style="background-color: #F0F0F0;border: 1px solid #CBCBCD;" width="100%" cellpadding="4" class="x-form">
							<tr>
								<td  colspan="2" style="background-color:#DCDCDF;padding:8px 0px 8px 0px;">&nbsp;&nbsp;<b><u>Thông tin tài sản (*)</u></b></td>
							</tr>
							<tr>
								<td class="x-form-label" >Mã tài sản : </td>
								<td class="x-form-input">
									<input class="x-text" readonly type="text" style="color:red;width:243px;" name="code" value="<?php _e($post["code"])?>"/>
									<span class="x-form-label" style="margin-left:35px;">Tên tài sản : </span>
									<input style="width:240px;"  class="x-text" type="text" name="title"  value="<?php _e($post["title"]);?>"/>
								</td>
							</tr>
							
							<tr>
								<td class="x-form-label">Loại tài sản : </td>
								<td class="x-form-input">
									<select name="asset_type_id" style="width:250px;" class="x-select">
										<?php foreach($this->get('type') as $ktype=>$vtype){
											?>
											<option <?php if($post["asset_type_id"]==$vtype['ID']){_e('selected');}?> value="<?php echo $vtype['ID'];?>"><?php echo $vtype['title'];?></option>
											<?php
										}?>
									</select>
									<span class="x-form-label" style="margin-left:35px;"> Nguyên giá : </span>
									<input class="x-text" type="text" name="value" style="width:179px;"   value="<?php _e($post["value"]);?>"/>
									<select class="x-select" name="mtype" >
										<option  value="VND">VND</option>
										<option  value="USD">USD</option>
									</select>
								</td>
							</tr>
							<tr>
								<td class="x-form-label">Model : </td>
								<td class="x-form-input">
									<input class="x-text" style="width:243px;"  type="text" name="model"  value="<?php _e($post["model"]);?>"/>
									<span class="x-form-label" style="margin-left:15px;"> Hãng sản xuất : </span>
									<input style="width:240px;"  class="x-text" type="text" name="origin"  value="<?php _e($post["origin"]);?>"/>
								</td>
							</tr>
																			
							<tr>
								<td class="x-form-label">Ngày mua : </td>
								<td class="x-form-input">
									<input class="x-text x-date"  onclick="date_picker(this,{noTime:true})" type="text" name="datebuy" style="width:60px"  value="<?php _e(show_date(DATE_FORMAT,$post["datebuy"]));?>"/>
									<span><i style="font-size:11px;">(dd/mm/yy)</i></span>
									<span class="x-form-label" style="margin-left:116px;"> Địa điểm mua : </span>
									<input class="x-text" style="width:240px;" type="text" name="buyat" value="<?php _e($post["buyat"]);?>"/>
								</td>
							</tr>
							
							<tr>
								<td class="x-form-label">Thời gian bảo hành : </td>
								<td class="x-form-input">
									<input class="x-text x-date" value="<?php _e(show_date(DATE_FORMAT,$post["time"]));?>"  type="text" name="time" onclick="date_picker(this,{noTime:true})" style="width:170px;"/>
									<span><i style="font-size:11px;">(dd/mm/yy)</i></span>
									<span style="margin-left:106px;" class="x-form-label">Mã số bảo hành : </span>
									<input class="x-text" value="<?php _e($post["codesu"]);?>"  type="text" name="codesu"  style="width:240px;"/>
								</td>
							</tr>
							<tr>
								<td class="x-form-label"> Tình trạng tài sản : </td>
								<td class="x-form-input">
									<select name="status" class="x-select" style="width:250px;">
										<option value="using">Đang sử dụng</option>
										<option value="dont">Không sử dụng</option>
									</select>
								</td>
							</tr>
							
							<tr>
								<td class="x-form-label">Mô tả : </td>
								<td class="x-form-input">
									<textarea class="x-editor" name="desc" style="width:610px;height:150px;"></textarea>
								</td>
							</tr>
							<tr>
								<td class="x-form-label"><span class="x-attachment"></span></td>
								<td class="x-form-input">
									<?php foreach( $this->get('files') as $file ):?>
									
									<div class='x-file-info'>
										<input checked type='checkbox' name='files[]' value='<?php _e($file['ID']);?>'/>
										<a href="<?php _ctrUrl($this);?>/File?ID=<?php _e($file['ID']);?>" target="_blank"><?php _e($file['filename']);?> <?php _e($file['size']);?> KB	</a>
									</div>
									<?php endforeach;?>
									<div class="x-files" url="<?php _baseUrl();?>/asset/Index/Upload?asset_id=<?php _e($this->get('asset_id'))?>" post_id="<?php _e($post['ID'])?>"></div>
								</td>
							</tr>
							
							<tr>
								<td></td>
								<td class="x-form-input">
									<input type="submit" value="Xác Nhận" class="x-button x-save"/>
									<a href="#Asset/" class="x-button x-fresh">Hủy bỏ</a>
								</td>
							</tr>
					</table>
</form>
